#include "config.h"

RTC_PCF8563 rtc(DEV_8563_I2C_NUM);


void PCF8563_Task(void*arg)
{
	while (true)
	{
        rtc.getDate();
        rtc.getTime();

        printf("%d:%d:%d\r\n",rtc.hour,rtc.minute,rtc.sec);

        if((rtc.hour == 6) && (rtc.minute == 0) && (rtc.sec == 00)) 
            Lamp_auto = 1;

        if((rtc.hour >= 0) && (rtc.hour <= 7) & ADC_Light.Value_Level ==0 ) 
            void max7219_power_off();

        if((rtc.hour == 0) && (rtc.minute == 20) && (rtc.sec == 00)) {
            xTaskCreate(Set_Time,
                "Set_Time",
                1024*2,
                NULL,
                10,
                NULL); 
        }

		vTaskDelay(1000/portTICK_RATE_MS);
	}
	

}